package com.itcast.Web;


import com.itcast.Dao.UserDao;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AppForDiSet {
    public static void main(String[] args) {

//        PublicDao publicDao = PublicFactory.getPublicDao();
//        publicDao.save();
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
//        PublicDao publicDao = (PublicDao) ctx.getBean("publicDao");
//        publicDao.save();
        UserDao userDao = (UserDao) ctx.getBean("userDao");
    userDao.save();
    }
}
